<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{#$title#}</title>
<meta http-equiv="X-UA-Compatible" content="IE=7">


<link href="{#$QISHI.site_template#}css/common.css" rel="stylesheet" type="text/css" />
<link href="{#$QISHI.site_template#}css/user.css" rel="stylesheet" type="text/css" />
<script src="{#$QISHI.site_dir#}ajax/ajax_category_jobs_resume.js" type='text/javascript' language="javascript"></script>
<script>
function chk_form()
{
if (document.Form1.wage.value=="")
	{
	alert("请选择您的期望月薪！")
	document.Form1.wage.focus();
	return (false);
	}
//--验证岗位性质
var f_nature = document.getElementsByName('nature[]');
var len=0;
var flag1=false;
for(var i = 0 ; i < f_nature.length;i++)
{
if(f_nature[i].checked == true )
{
flag1=true;
break;
}
}
if (flag1==false)
{
alert("请选择期望岗位性质！");
return (false);
}
//--验证期望工作地
var f_area = document.getElementsByName('area[]');
var len=0;
var flag2=false;
for(var i = 0 ; i < f_area.length;i++)
{
if(f_area[i].checked == true )
{
flag2=true;
break;
}
}
if (flag2==false)
{
alert("请选择期望工作地区！");
return (false);
}
//--验证期望工作地
var f_jobs = document.getElementsByName('jobs[]');
var len=0;
var flag3=false;
for(var i = 0 ; i < f_jobs.length;i++)
{
if(f_jobs[i].checked == true )
{
flag3=true;
break;
}
}
if (flag3==false)
{
alert("请选择期望从事的岗位！");
return (false);
}
//--验证从事行业
var f_trade = document.getElementsByName('trade[]');
var len=0;
var flag4=false;
for(var i = 0 ; i < f_trade.length;i++)
{
if(f_trade[i].checked == true )
{
flag4=true;
break;
}
}
if (flag4==false)
{
alert("请选择期望从事的行业！");
return (false);
}
return (true);
}
//以下函数是隐藏select，解决IE6 select显示在DIV上方的bug
function isdisplay(i)     
{      
if(document.getElementById(i).style.display=="")     
{     
 document.getElementById(i).style.display="none";     
}     
else     
{     
document.getElementById(i).style.display="";     
}
}
</script>
<body>
{#include file="header.htm"#}
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:8px;" >
  <tr>
    <td width="208" valign="top" class="link_bk">
	{#include file="member_personal/personal_left.htm"#}
	</td>
    <td valign="top"><form id="Form1" name="Form1" method="post" action="?act=save_resume_intention" onsubmit="return chk_form();">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="user_right_box">
        <tr>
          <td height="22" colspan="2" class="user_right_box_bg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="28"><span class="right_top_tit" style="padding-left:15px;">编辑简历</span></td>
                <td width="60" class="link_lan"><a href="?">管理首页</a></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="22"><table width="100%" border="0" cellspacing="0" cellpadding="4" style="margin-bottom:150px;">
            <tr>
              <td height="50" colspan="2" bgcolor="#F5FAFC" style=" border-bottom:1px #CCCCCC dashed; color:#003399">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:14px;">您的求职意向</span> <span style="color:#999999">(带<strong  style="color:#FF0000">*</strong>的为必填)</span></td>
              </tr>
			    <tr>
              <td width="100" height="10"></td>
              <td></td>
            </tr>
            <tr>
              <td width="160" height="23" align="right">最近工作过的职位：</td>
              <td><input name="recentjobs" type="text" class="user_input" id="recentjobs" maxlength="40" value="{#$resume_intention.recentjobs#}"  style="width:280px;" /><span style="color:#999999"> (无工作经验者可忽略)</span></td>
            </tr>
            <tr>
              <td height="23" align="right">期望岗位性质：</td>
              <td>  {#section name=nature loop=$nature#}
		   <label><input name="nature[]"  type="checkbox" value="{#$nature[nature].id#}" {#section name=intention_nature loop=$intention_nature#}{#if $nature[nature].id eq $intention_nature[intention_nature].jid#}checked="checked"{#/if#}{#/section#} />
		   {#$nature[nature].categoryname#}&nbsp;&nbsp;&nbsp;&nbsp;</label>  
		  {#/section#}
		  </td>
            </tr>
						<tr>
              <td height="23" align="right"><strong  style="color:#FF0000">*</strong>期望月薪：</td>
              <td>
			  <select name="wage" id="wage"  style="width:161px; height:20px; font-size:12px;">
		  <option value="">请选择期望月薪</option>
		  {#section name=wage loop=$wage#}
            <option value="{#$wage[wage].id#}" {#if $wage[wage].id eq $resume_intention.wage#} selected="selected"{#/if#}>{#$wage[wage].categoryname#}</option>
			{#/section#}
            </select>
			  </td>
            </tr>
			  <tr>
              <td height="23" align="right" valign="top"><strong  style="color:#FF0000">*</strong>期望工作的地区：</td>
              <td><input type="button" name="Submit2" value="选择 / 修改" class="select_submit_long"  onclick="openbg(1);openSelect('1','lay_area');isdisplay('wage')"/>
			  <div id="area" style="color:#003399; line-height:23px; padding-top:3px;">
			{#section name=intention_area loop=$intention_area#}
			  <input type="checkbox" checked="true" value="{#$intention_area[intention_area].jid#}" style="display:none;" name="area[]">{#$intention_area[intention_area].jid_name#}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  {#sectionelse#}
			  <span style="color:#FF3300">请选择期望工作的地区</span>
			  {#/section#}
			  </div>
			  </td>
            </tr>
			  <tr>
              <td height="23" align="right" valign="top"><strong  style="color:#FF0000">*</strong>期望从事的岗位：</td>
              <td><input type="button" name="Submit22" value="选择 / 修改" class="select_submit_long" onclick="openbg(1);openSelect('1','selectItem');;isdisplay('wage')"/><div id="jobs" style="color:#003399; line-height:23px; padding-top:3px;">
			  {#section name=intention_jobs loop=$intention_jobs#}
			  <input type="checkbox" checked="true" value="{#$intention_jobs[intention_jobs].subclass#}" style="display:none;" name="jobs[]">{#$intention_jobs[intention_jobs].subclass_name#}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  {#sectionelse#}
			  <span style="color:#FF3300">请选择希望从事的岗位</span>
			  {#/section#}
			  </div></td>
            </tr><tr>
              <td height="23" align="right" valign="top"><strong  style="color:#FF0000">*</strong>期望从事的行业：</td>
              <td><input type="button" name="Submit23" value="选择 / 修改" class="select_submit_long"  onclick="openbg(1);openSelect('1','lay_trade');isdisplay('wage')"/>
			    <div id="trade" style="color:#003399; line-height:23px; padding-top:3px;">
			{#section name=intention_trade loop=$intention_trade#}
			  <input type="checkbox" checked="true" value="{#$intention_trade[intention_trade].jid#}" style="display:none;" name="trade[]">{#$intention_trade[intention_trade].jid_name#}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  {#sectionelse#}
			  <span style="color:#FF3300">请选择期望从事的行业</span>
			  {#/section#}
			  </div>
			  </td>
            </tr>
              <td height="23" align="right"></td>
              <td height="60"><input type="submit" name="Submit" value="下一步"  style="font-size:12px; padding:3px;"/></td>
            </tr>
          </table></td>
          <td width="150" valign="top" class="personal_resume_right_box" >
		 {#include file="member_personal/personal_right.htm"#} 
		  </td>
        </tr>
      </table>
	  </form>
    </td>
  </tr>
</table>
<!--弹出地区选择 -->
<div id="lay_area" style="display:none;background:#FFF;position:absolute;overflow:hidden;z-index:99;" >
<div style="width:650px;border:4px #95C9E1 solid">
<div style="width:650px;background-color: #F9FCFD; height:25px;" >
<div style="height:25px;width:25px; float:right; cursor:pointer">
<img src="{#$QISHI.site_template#}images/close.gif" width="25" height="25"  onclick="closeLayer('lay_area');isdisplay('wage')"/>
</div>
<div class="clear"></div>
</div>
  <table width="600" border="0" align="center" cellpadding="0" cellspacing="3">
    <tr>
      <td width="591" height="25"><strong style="font-size:14px; color:#0066FF">期望工作的地区：</strong></td>
      </tr>
  </table>
  <table width="600" border="0" align="center" cellpadding="5" cellspacing="0" >
    <tr>
      <td></td>
      </tr>
    <tr>
      <td><div id="show_area">
	   {#section name=area loop=$area#}
	 <div class="Item_div" onMouseOver="this.className='Item_div_on'" onMouseOut="this.className='Item_div'"><label><input type="checkbox" name="area_items" value="{#$area[area].id#}" {#section name=intention_area loop=$intention_area#}{#if $intention_area[intention_area].jid eq $area[area].id#}checked="checked"{#/if#}{#/section#}/>{#$area[area].categoryname#}</label><input name="area_items_name" type="hidden" value="{#$area[area].categoryname#}" /></div>
	{#/section#}	  
	 </div> </td>
    </tr>
    <tr>
      <td height="40" align="center"><input type="button" name="Submit3" value="确定" style="font-size:12px; padding:3px; width:60px;" onclick="closeLayer('lay_area');copy_area('show_area','area');isdisplay('wage')"/></td>
    </tr>
  </table>
</div>
</div>
<!--弹出行业选择 -->
<div id="lay_trade" style="display:none;background:#FFF;position:absolute;overflow:hidden;z-index:99;" >
<div style="width:850px;border:4px #95C9E1 solid">
<div style="width:850px;background-color: #F9FCFD; height:25px;" >
<div style="height:25px;width:25px; float:right; cursor:pointer">
<img src="{#$QISHI.site_template#}images/close.gif" width="25" height="25"  onclick="closeLayer('lay_trade');isdisplay('wage')"/>
</div>
<div class="clear"></div>
</div>
  <table width="800" border="0" align="center" cellpadding="0" cellspacing="3">
    <tr>
      <td  height="25"><strong style="font-size:14px; color:#0066FF">期望从事的行业：</strong><span style=" color:#999999">可多选，不能超过 6 项</span></td>
      </tr>
  </table>
  <table width="800" border="0" align="center" cellpadding="5" cellspacing="0" >
    <tr>
      <td></td>
      </tr>
    <tr>
      <td><div id="show_trade">
	   {#section name=trade loop=$trade#}
	 <div class="Item_div" onMouseOver="this.className='Item_div_on'" onMouseOut="this.className='Item_div'"><label><input type="checkbox" name="trade_items" value="{#$trade[trade].id#}"  onclick="check_trade(this,'trade_items')"{#section name=intention_trade loop=$intention_trade#}{#if $intention_trade[intention_trade].jid eq $trade[trade].id#}checked="checked"{#/if#}{#/section#}/>{#$trade[trade].categoryname#}</label><input name="trade_items_name" type="hidden" value="{#$trade[trade].categoryname#}" /></div>
	{#/section#}	  
	 </div> </td>
    </tr>
    <tr>
      <td height="40" align="center"><input type="button" name="Submit3" value="确定" style="font-size:12px; padding:3px; width:60px;" onclick="closeLayer('lay_trade');copy_trade('show_trade','trade');isdisplay('wage')"/></td>
    </tr>
  </table>
</div>
</div>
<!--弹出岗位选择 -->
<div id="selectItem" style="display:none;background:#FFF;position:absolute;overflow:hidden;z-index:99;" >
<div style="width:650px;border:4px #95C9E1 solid">
<div style="width:650px;background-color: #F9FCFD; height:25px;" >
<div style="height:25px;width:25px; float:right; cursor:pointer">
<img src="{#$QISHI.site_template#}images/close.gif" width="25" height="25"  onclick="closeLayer('selectItem');isdisplay('wage')"/>
</div>
<div class="clear"></div>
</div>
  <table width="600" border="0" align="center" cellpadding="0" cellspacing="3">
    <tr>
      <td height="25" colspan="2"><strong style="font-size:14px; color:#0066FF">期望从事的岗位：</strong><span style=" color:#999999">可多选，不能超过 6 项</span></td>
      </tr>
    <tr>
      <td width="53" height="27"><img src="{#$QISHI.site_template#}images/select1.gif" width="50" height="27" /></td>
      <td width="538" >
	   <div id="isshow"></div>
	  </td>
    </tr>
  </table>
  <table width="600" border="0" align="center" cellpadding="5" cellspacing="0" >
    <tr>
      <td></td>
      </tr>
    <tr>
      <td>
	 <div id="selectSub">
	 请选择职位类别：
    <select name=""  style="width:210px; height:20px; font-size:12px;" onchange="show_category_js(this.value);showSelect(this.value)">
	{#section name=category loop=$category#}
     <option value="{#$category[category].id#}">{#$category[category].categoryname#}</option>
	{#/section#}
      </select>
	 {#section name=category loop=$category#}
	 <div id="sub{#$category[category].id#}"></div>
	{#/section#}
	</div>
	</td>
    </tr>
    <tr>
      <td height="40" align="center"><input type="button" name="Submit3" value="确定" style="font-size:12px; padding:3px; width:60px;" onclick="closeLayer('selectItem');makeSure('isshow','jobs');isdisplay('wage')"/></td>
    </tr>
  </table>
</div>
</div>
<span id="bg"></span>
<script type="text/javascript">
//增加项目
var lenMax =6;//最多选项 
var showGrow = 1;//已打开组
var selectCount = 0; //已选数量 
var grow=new Array({#section name=category loop=$category#}{#if $category[category].id eq 1#}{#else#},{#/if#}"{#$category[category].id#}"{#/section#});
var items = document.getElementsByName("items");
var items_name = document.getElementsByName("items_name");
showSelect(showGrow);
show_category(showGrow);
//调用AJAX
function show_category_js(id){
var show=$("sub"+id).innerHTML;//检查此小类下有没有内容，没有用ajax加载
if (show==""){show_category(id)};
}
//显示数组
function showSelect(id){
 for(var i = 0 ; i < grow.length ;i++)
 {
  $("sub"+grow[i]).style.display = "none";
 }
 $("sub"+id).style.display = "block";
 showGrow = id;
}
//添加岗位项目
function addPreItem(str,isshow){ 
var len　= 0 ;
for(var i = 0 ; i < items.length;i++)
{
if(items[i].checked == true ){
len++;
if(len > lenMax)
{
str.checked=false;
alert("不能超过" + lenMax +"个选项！");
break;
}
}
}
$(isshow).innerHTML="";
for(var i = 0 ; i < items.length;i++)
{
if(items[i].checked == true ){
var mes = "<label><input type='checkbox' checked='true' value='"+ items[i].value +"' onclick='copyItem(\"isshow\",\"isshow\");same(this);' name=\"items_1\">" + items_name[i].value;
   mes += "</label><input name=\"items_name_1\" type=\"hidden\" value=\""+ items_name[i].value +"\"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$(isshow).innerHTML += mes;
//alert(items[i].value);
}
}
}
//拷贝
function copyItem(id1,id2){
 var mes = "";
var page_items = document.getElementsByName("items_1");
var page_name = document.getElementsByName("items_name_1");
 for(var i = 0 ; i < page_items.length;i++)
 {
  if(page_items[i].checked == true)
  {
   mes += "<label><input type='checkbox' checked='true' value='"+ page_items[i].value +"' onclick='copyItem(\"" + id2+ "\",\""+ id1 +"\");same(this);' name=\"items_1\">" + page_name[i].value; 
   mes += "</label><input name=\"items_name_1\" type=\"hidden\" value=\""+ page_name[i].value +"\" \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";  
  }
 }
 $(id2).innerHTML = "";
 $(id2).innerHTML += mes;
 //alert($(id2).innerHTML);
}
//拷贝
function copyItem_page(id1,id2){
 var mes = "";
var page_items = document.getElementsByName("items_1");
var page_name = document.getElementsByName("items_name_1");
if (page_items.length==0){return false}
 for(var i = 0 ; i < page_items.length;i++)
 {
  if(page_items[i].checked == true)
  {
   mes += "<input type='checkbox' checked='true' value='"+ page_items[i].value +"' style=\"display:none;\" name='jobs[]'>" + page_name[i].value+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  }
 }
 $(id2).innerHTML = "";
 $(id2).innerHTML += mes;
 //alert($(id2).innerHTML);
}//
//再大数组中减去刚刚取消的值
function same(ck){
 for(var i = 0 ; i < items.length;i++)
 {
  if(ck.value == items[i].value)
  {
   items[i].checked = ck.checked;
  }
 }
}
//拷贝到指定地方,div1里的内容拷贝到div2
function makeSure(div1,div2){
 //alert(1);
 //$("makeSureItem").innerHTML = $("previewItem").innerHTML;
 copyItem_page(div1,div2);
}
//打开内容层
function openSelect(state,layname){ 
 if(state == 1) 
 {
  $(layname).style.display = "block";
  $(layname).style.left = ($("bg").offsetWidth - $(layname).offsetWidth)/2 + "px";
  $(layname).style.top = document.body.scrollTop + 200 + "px"; 
 }
 else
 {
  $(layname).style.display = "none";
 }
}
//打开背景
function openbg(){
var arrayPageSize   = getPageSize();//调用getPageSize()函数
var mybody = document.getElementById("bg");
mybody.style.position = "absolute";
mybody.style.width = "100%";
mybody.style.height = (arrayPageSize[1] + 135 + 'px');
mybody.style.zIndex = 98;
mybody.style.top = 0;
mybody.style.left = 0;
mybody.style.filter = "alpha(opacity=50)";
mybody.style.opacity = 0.5;
mybody.style.background = "#ddf";
mybody.style.display =  "block";
}
//关闭层
function closeLayer(layname){
document.getElementById(layname).style.display = "none";
document.getElementById("bg").style.display = "none";
return false;
}
//获取对象
function $(o){ 
 if(typeof(o) == "string")
 return document.getElementById(o);
 return o;
}
//获取页面实际大小
function getPageSize(){
var xScroll,yScroll;
if (window.innerHeight  &&  window.scrollMaxY){
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
sScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth,windowHeight;
//var pageHeight,pageWidth;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement  &&  document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) {
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
var pageWidth,pageHeight
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth) {
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
//------------------------------------------添加地区部分
//拷贝地区到页面
function copy_area(id1,id2){
 var mes = "";
var area_items = document.getElementsByName("area_items");
var area_name = document.getElementsByName("area_items_name");
if (area_items.length==0){return false}
 for(var i = 0 ; i < area_items.length;i++)
 {
  if(area_items[i].checked == true)
  {
   mes += "<input type='checkbox' checked='true' value='"+ area_items[i].value +"' style=\"display:none;\" name='area[]'>" + area_name[i].value+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  }
 }
 if (mes==""){return false}
 $(id2).innerHTML = "";
 $(id2).innerHTML += mes;
 //alert($(id2).innerHTML);
}//
//-----------------------------------------添加行业部分
//拷贝行业区到页面
function copy_trade(id1,id2){
 var mes = "";
var area_items = document.getElementsByName("trade_items");
var area_name = document.getElementsByName("trade_items_name");
if (area_items.length==0){return false}
 for(var i = 0 ; i < area_items.length;i++)
 {
  if(area_items[i].checked == true)
  {
   mes += "<input type='checkbox' checked='true' value='"+ area_items[i].value +"' style=\"display:none;\" name='trade[]'>" + area_name[i].value+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  }
 }
 if (mes==""){return false}
 $(id2).innerHTML = "";
 $(id2).innerHTML += mes;
 //alert($(id2).innerHTML);
}//
//验证选择行业的数量
function check_trade(str,itemsname){
var items = document.getElementsByName(itemsname);
var len=0;
for(var i = 0 ; i < items.length;i++)
{
if(items[i].checked == true ){
len++;
if(len > lenMax){
str.checked=false;
alert("不能超过" + lenMax +"个选项！");
break;
}
}
}
}
//-----------
</script>
{#include file="footer.htm"#}
<span id="op1"></span>
</body>
</html>
